import { DataSetProps } from "choerodon-ui/pro/lib/data-set/DataSet";
import { FieldType } from "choerodon-ui/pro/lib/data-set/enum";

const shopDataSet = (): DataSetProps => ({
  autoCreate: true,
  autoQuery: true,
  fields: [
    { name: 'code', label: '编码', type: FieldType.string },
    { name: 'name', label: '店铺名称', type: FieldType.string },
    { name: 'price', label: '价格', type: FieldType.number },
    { name: 'count', label: '库存', type: FieldType.number },
    { name: 'status', label: '状态', type: FieldType.boolean },
    { name: 'desc', label: '描述', type: FieldType.string },
  ],
  transport: {
    read: {
      url: '/_api/edit-table-by-modal/table',
      method: 'get',
    },
  },
});

export default shopDataSet;